<extend name='Layout/index' />

<block name='breadcrumb'>
	<li>
		<i class="icon-home home-icon"></i>
		<a href="#">首页</a>
	</li>
	<li class="active">互动管理</li>
</block>

<block name='page_header'>
	<h1 style="font-size:14px">
		 邮件管理
		<i class="icon-double-angle-right"></i>
		 详情信息
		 
	</h1>
</block>

<block name='main_content'>
		<div style="font-size:14px;margin-left:10px;color:red;font-weight:bold;">用户详情</div>
		<div class="row">
			<table  class="table table-striped table-bordered table-hover  ">
				<thead>
					<tr align="left" class="bg-primary" style="background:abcd" bgcolor="red">
						<th>ID</th>
						<th>发件人</th>
						<th>收件人</th>
						<th>发送时间</th>
						<td>阅读</td>
						<td>信件内容</td>
						<th>操作</th>
					</tr>
				</thead>	
				<tbody>
					<form action="">
						<volist name='resu' id='vo'>
							<tr onclick="kkbb(this)" style="height:50px; font-size:13px;">
								<td id="dfasgadjk"><{$vo.emid}></td>
								<td><{$vo.uname}></td>
								<td><{$vo.ename}></td>
								<td><?php echo date('Y-m-d H:i:s',$vo['time']) ?></td>
								<td class="text-primary"><?php echo $vo['cstatus'] == 0?'未读':'已读' ?></td>
								<td >
								<div id="contentww" style="width:200px;font-size:10px; height:50px; overflow:hidden;"><{$vo.content}></div>
								
								</td>
								<td>
									<a  href="javascript:showBBBg();">查看</a>
								 
									<a href="<{:U('Interactive/edit',array('id'=>$vo['emid']))}>">删除</a>
								</td>
							</tr>
						<!-- 弹框 -->
									
						
						</volist>
						<div id="main111">  
					        <div id="fullbg"></div> 
					        <!-- 外层大框 -->
					        <div id="dialog"> 
					        <p class="close" style="background:#317EF3;"><a href="#" style="font-size:13px;padding:10px;" onclick="closeBg();">关闭</a></p>
					        <div class="w_fl " style="height:23px; background:#438EB9;width:91%;"></div> 
							<div class="w_clear"></div>
					    
						    <div class=" ">
					        	<div> 
					        		<span class="disblock   werxiao">&nbsp;&nbsp;&nbsp;信件ID：</span>
					        		<span class="disblock  "><span id="dasdfsdfsfasbdfgf" style="font-size:14px;"><!-- <{$vo.emid}> -->
					       			</span> &nbsp;&nbsp;<!-- (发送时间:<?php /* echo date('Y-m-d H:i:s',$vo['time']) */ ?>) --></span> 
					       			<br>

					        		<span    class="disblock   werxiao">&nbsp;&nbsp;&nbsp;发件人：</span> 
					        		<span id="fajianr" class="disblock"><!-- <{$vo.uname}> --></span><br>
					        		<span class="disblock werxiao  ">&nbsp;&nbsp;&nbsp;收件人：</span> 
					        		<span id="shojianr"class="disblock  "><!-- <{$vo.ename}> --></span><br>
					        		<span class="disblock werxiao  ">&nbsp;&nbsp;状态设置：</span>
					        		<span class="disblock  "><input type="radio" name="str" checked >通过</span>
					        		<span class="disblock  "><input name="str" type="radio" >锁定</span>
					        		<br>
					        		<div class="  w_fl" style="width:100px;height:100px;padding-top:30px; border-radius:30px;background:#F5FBFF;font-size:18px;">
					        			&nbsp;&nbsp;信件内容
					        		</div>
					        		<div class="  w_fl"> 
					        			<textarea id="vocontent" style="resize:none" name="text" id="" cols="60" rows="13"><!-- <{$vo.content}> --></textarea> 
					        		</div>
									<script>
										$('text[name=text]').blur(function(){

										});

									</script>
					        		<div class="w_clear"></div>
					        		 <br>
					        		<div>

					        			<input style="margin-left:10px;margin-right: 54px; border:0px; border-radius:5px;height:46px;width:112px;" class="w_fr btn btn-success"value="编辑保存" onclick="closeBg();" type="button">&nbsp;&nbsp;
					        		</div>
					        		 
									<div class="w_clear"></div>
					        	</div>
					        </div> 


					
					        </div> 
					     </div> 

					</form>
				</tbody>

			</table>
		</div>


	<script type="text/javascript"> 

//显示灰色 jQuery 遮罩层 
function showBBBg() { 
var bh = $("body").height(); 
var bw = $("body").width(); 
$("#fullbg").css({ 
height:bh, 
width:bw, 
display:"block" 
}); 
$("#dialog").show(); 
} 
//关闭灰色 jQuery 遮罩 
function closeBg() { 
var id  = $('#dasdfsdfsfasbdfgf').html();
var vocp = $('#vocontent').val();

	  $.ajax({

    url:"<{:U('Interactive/xxadd')}>",
    type:'post',
  //  async:false,    // 同步/ 异步 
    data:{content:vocp,id:id},
    dataType:'json',
    success: function (data){
       // $('#yhky').removeClass().addClass(data);
       		 
       		alert('修改成功');
        }

})
	




$("#fullbg,#dialog").hide(); 
} 
</script>	
<script>
		function kkbb(ss){
			
			var woshilaod = $(ss).children('#dfasgadjk');

			var id = $(ss).children('#dfasgadjk').html();
			var uname = woshilaod.next().html();
			var ename = woshilaod.next().next().html();
			var etime = woshilaod.next().next().next().html();
			var contentww = woshilaod.next().next().next().next().next().children('div').html();
		 
			$('#dasdfsdfsfasbdfgf').html(id);
			$('#fajianr').html(uname);
			$('#shojianr').html(ename);
			$('#vocontent').val(contentww);
			 
		}
	</script>

</block>
 